<include file="public@header"/>
</head>
<body>
<script type="text/javascript" src="__STATIC__/js/layer/layer.js"></script>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="javascript:;">所有#DESC#</a></li>
        <li><a href="{:url('#CONTROLLERNAME#/add')}">添加#DESC#</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('#CONTROLLERNAME#/index')}">
        标题:
        <input type="text" class="form-control" name="keyword" style="width: 200px;"
               value="{$keyword|default=''}" placeholder="请输入关键字...">
        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('#CONTROLLERNAME#/index')}">清空</a>
    </form>
    <form class="js-ajax-form" action="{:url('#CONTROLLERNAME#/listOrder')}" method="post">
        <div class="table-actions">
           <button type="submit" class="btn btn-primary btn-sm js-ajax-submit">{:lang('SORT')}</button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('#CONTROLLERNAME#/toggle',array('display'=>'1'))}" data-subcheck="true">
                {:lang('DISPLAY')}
            </button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('#CONTROLLERNAME#/toggle',array('hide'=>1))}" data-subcheck="true">{:lang('HIDE')}
            </button>
        </div>
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="15">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
				<th width="50">排序</th>
                <th width="50">ID</th>
                <th width="50">创建时间</th>
                <th width="50">更新时间</th>
                #title#
                <th width="90">操作</th>
            </tr>
            </thead>
            <foreach name="lists" item="vo">
                <tr>
                    <td>
                        <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                               value="{$vo.id}" title="ID:{$vo.id}">
                    </td>
					<td><input name="listorders[{$vo.id}]" type="text" size="3" value="{$vo.listorder}"
                                   class="input-order"></td>
                    <td><b>{$vo.id}</b></td>
                    #content_list#
                    <td>
                        <a href="{:url('#CONTROLLERNAME#/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                        <a href="{:url('#CONTROLLERNAME#/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
                    </td>
                </tr>
            </foreach>
        </table>
        <div class="table-actions">
            <button type="submit" class="btn btn-primary btn-sm js-ajax-submit">{:lang('SORT')}</button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('#CONTROLLERNAME#/toggle',array('display'=>'1'))}" data-subcheck="true">
                {:lang('DISPLAY')}
            </button>
            <button class="btn btn-primary btn-sm js-ajax-submit" type="submit"
                    data-action="{:url('#CONTROLLERNAME#/toggle',array('hide'=>1))}" data-subcheck="true">{:lang('HIDE')}
            </button>
        </div>
        <ul class="pagination">{$page|default=''}</ul>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>

    function reloadPage(win) {
        win.location.reload();
    }
    function album(id,name,cla){
        var data=[];
        var arr={};
        $('#layer-photos-demo-'+cla+id+' img').each(function (i) {
            var src = $(this).attr('layer-src');
            data[i]={}
                data[i]['alt']='生活照';
            data[i]['pid']='';
            data[i]['thumb']='';
            data[i]['src']=src;
        })
        arr['id']=id;
        arr['start']='0';
        arr['title']=name;
        arr['data']=data;
        var arr_str  = JSON.stringify(arr);
        layer.photos({
            photos: JSON.parse(arr_str) //格式见API文档手册页
            ,anim: 5 //0-6的选择，指定弹出图片动画类型，默认随机
        });
    }
</script>
</body>
</html>